package com.aster.service.manage.dto.do2dto;

import com.aster.service.manage.domain.TbEscortEnterpriseInfo;
import com.aster.service.manage.domain.TbEscortUserInfo;
import com.aster.service.manage.dto.DtoEscortEnterpriseInfo;
import com.aster.service.manage.dto.DtoEscortUserInfo;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@org.mapstruct.Mapper
public interface EscortUserInfoConvert {
    EscortUserInfoConvert MAPPER = Mappers.getMapper(EscortUserInfoConvert.class);

    public DtoEscortUserInfo do2dto(TbEscortUserInfo tbEscortUserInfo);

    public List<DtoEscortUserInfo> dos2dtos(List<TbEscortUserInfo> list);

    public TbEscortUserInfo dto2do(DtoEscortUserInfo dtoEscortUserInfo);

    @Mapping(target="enterpriseId",ignore=true)
    @Mapping(target="name",ignore=true)
    @Mapping(target="persionId",ignore=true)
    @Mapping(target="tel",ignore=true)
    @Mapping(target="sex",ignore=true)
    @Mapping(target="age",ignore=true)
    @Mapping(target="employmentDate",ignore=true)
    @Mapping(target="dutyState",ignore=true)
    @Mapping(target="escortPrice",ignore=true)
    @Mapping(target="headPortrait",ignore=true)
    @Mapping(target="openId",ignore=true)
    @Mapping(target="state",ignore=true)
    public TbEscortUserInfo updateDeleted(DtoEscortUserInfo dtoEscortUserInfo);

    @Mapping(target="enterpriseId",ignore=true)
    @Mapping(target="name",ignore=true)
    @Mapping(target="persionId",ignore=true)
    @Mapping(target="tel",ignore=true)
    @Mapping(target="sex",ignore=true)
    @Mapping(target="age",ignore=true)
    @Mapping(target="employmentDate",ignore=true)
    @Mapping(target="dutyState",ignore=true)
    @Mapping(target="escortPrice",ignore=true)
    @Mapping(target="headPortrait",ignore=true)
    @Mapping(target="openId",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbEscortUserInfo updateState(DtoEscortUserInfo dtoEscortUserInfo);

    @Mapping(target="state",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbEscortUserInfo addData(DtoEscortUserInfo dtoEscortUserInfo);
}
